package com.wanxi.test;

public class TwoOfArrayFor {
    public static void main(String[] args) {
        int[][] arr = new int[][]{
                {1, 3, 5, 7},
                {3, 5},
                {5}
        };
        int sum=0;
        for (int i = 0; i < arr.length; i++) {
//            System.out.println(arr[i]);
            int[] temp = arr[i];
            for (int j = 0; j < temp.length; j++) {
                sum+=arr[i][j];
                System.out.print(arr[i][j] + " ");
            }
            System.out.println();
        }
        System.out.println(sum);
    }
}
